package com.atguigu.facade;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 子系统1：dvd
 * @create: 2022-02-21 14:35
 **/
public class DvdPlayer {
    /**
     * 单例模式，使用饿汉式
     */
    private static DvdPlayer instance = new DvdPlayer();

    public static DvdPlayer getInstance(){
        return instance;
    }

    public void on(){
        System.out.println("DVD 打开");
    }

    public void off(){
        System.out.println("DVD 关闭");
    }

    public void play(){
        System.out.println("DVD 正在播放");
    }

    public void pause(){
        System.out.println("DVD 暂停");
    }
}
